Since commit
5a23c96bd918 we use EXPLICIT_NOTIFY for properties,
however there are still cases where we still notify unconditionally
from the setter, because we don't check the existing value first.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2325>
priv = st_button_get_instance_private (button);
+ if (g_strcmp0 (priv->text, text) == 0)
+ return;
+
g_free (priv->text);
if (text)
if (ST_IS_ICON (icon))
{
+ if (g_strcmp0 (st_icon_get_icon_name (ST_ICON (icon)), icon_name) == 0)
+ return;
+
st_icon_set_icon_name (ST_ICON (icon), icon_name);
}
else
g_return_if_fail (ST_IS_BUTTON (button));
priv = st_button_get_instance_private (button);
+
+ if (priv->button_mask == mask)
+ return;
+
priv->button_mask = mask;
g_object_notify_by_pspec (G_OBJECT (button), props[PROP_BUTTON_MASK]);
g_return_if_fail (ST_IS_BUTTON (button));
priv = st_button_get_instance_private (button);
+
+ if (priv->is_toggle == toggle)
+ return;
+
priv->is_toggle = toggle;
g_object_notify_by_pspec (G_OBJECT (button), props[PROP_TOGGLE_MODE]);
g_return_if_fail (ST_IS_BUTTON (button));
priv = st_button_get_instance_private (button);
- if (priv->is_checked != checked)
- {
- priv->is_checked = checked;
+ if (priv->is_checked == checked)
+ return;
- if (checked)
- st_widget_add_style_pseudo_class (ST_WIDGET (button), "checked");
- else
- st_widget_remove_style_pseudo_class (ST_WIDGET (button), "checked");
- }
+ priv->is_checked = checked;
+
+ if (checked)
+ st_widget_add_style_pseudo_class (ST_WIDGET (button), "checked");
+ else
+ st_widget_remove_style_pseudo_class (ST_WIDGET (button), "checked");
g_object_notify_by_pspec (G_OBJECT (button), props[PROP_CHECKED]);
}
priv = st_entry_get_instance_private (entry);
+ if (priv->primary_icon == icon)
+ return;
+
_st_entry_set_icon (entry, &priv->primary_icon, icon);
g_object_notify_by_pspec (G_OBJECT (entry), props[PROP_PRIMARY_ICON]);
}
priv = st_entry_get_instance_private (entry);
+ if (priv->secondary_icon == icon)
+ return;
+
_st_entry_set_icon (entry, &priv->secondary_icon, icon);
g_object_notify_by_pspec (G_OBJECT (entry), props[PROP_SECONDARY_ICON]);
}
priv = ST_ENTRY_PRIV (entry);
+ if (priv->hint_actor == hint_actor)
+ return;
+
if (priv->hint_actor != NULL)
{
clutter_actor_remove_child (CLUTTER_ACTOR (entry), priv->hint_actor);
g_return_if_fail (ST_IS_ICON (icon));
+ if (g_strcmp0 (icon_name, st_icon_get_icon_name (icon)) == 0)
+ return;
+
if (icon_name && *icon_name)
gicon = g_themed_icon_new_with_default_fallbacks (icon_name);
g_return_if_fail (ST_IS_ICON (icon));
+ if (g_strcmp0 (fallback_icon_name, st_icon_get_fallback_icon_name (icon)) == 0)
+ return;
+
if (fallback_icon_name && *fallback_icon_name)
gicon = g_themed_icon_new_with_default_fallbacks (fallback_icon_name);
priv = st_widget_get_instance_private (widget);
+ if (g_strcmp0 (name, priv->accessible_name) == 0)
+ return;
+
if (priv->accessible_name != NULL)
g_free (priv->accessible_name);
g_return_if_fail (ST_IS_WIDGET (widget));
priv = st_widget_get_instance_private (widget);
+
+ if (priv->accessible_role == role)
+ return;
+
priv->accessible_role = role;
g_object_notify_by_pspec (G_OBJECT (widget), props[PROP_ACCESSIBLE_ROLE]);